package com.phiture.erp.common.constants;

import cn.iocoder.yudao.framework.common.exception.ErrorCode;

/**
 * ERP 错误码枚举类
 * <p>
 * erp 系统，使用 1-030-000-000 段
 */
public interface ErrorCodeConstants {

    // ========== ERP 供应商（1-030-100-000） ==========
    ErrorCode SUPPLIER_NOT_EXISTS = new ErrorCode(1_030_100_000, "供应商不存在");
    ErrorCode SUPPLIER_NOT_ENABLE = new ErrorCode(1_030_100_000, "供应商({})未启用");

    // ========== ERP 采购订单（1-030-101-000） ==========
    ErrorCode PURCHASE_ORDER_NOT_EXISTS = new ErrorCode(1_030_101_000, "采购订单不存在");
    ErrorCode PURCHASE_ORDER_DELETE_FAIL_APPROVE = new ErrorCode(1_030_101_001, "采购订单({})已审核，无法删除");
    ErrorCode PURCHASE_ORDER_PROCESS_FAIL = new ErrorCode(1_030_101_002, "反审核失败，只有已审核的采购订单才能反审核");
    ErrorCode PURCHASE_ORDER_APPROVE_FAIL = new ErrorCode(1_030_101_003, "审核失败，只有未审核的采购订单才能审核");
    ErrorCode PURCHASE_ORDER_NO_EXISTS = new ErrorCode(1_030_101_004, "生成采购单号失败，请重新提交");
    ErrorCode PURCHASE_ORDER_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_101_005, "采购订单({})已审核，无法修改");
    ErrorCode PURCHASE_ORDER_NOT_APPROVE = new ErrorCode(1_030_101_006, "采购订单未审核，无法操作");
    ErrorCode PURCHASE_ORDER_ITEM_IN_FAIL_PRODUCT_EXCEED = new ErrorCode(1_030_101_007, "采购订单项({})超过最大允许入库数量({})");
    ErrorCode PURCHASE_ORDER_PROCESS_FAIL_EXISTS_IN = new ErrorCode(1_030_101_008, "反审核失败，已存在对应的采购入库单");
    ErrorCode PURCHASE_ORDER_ITEM_RETURN_FAIL_IN_EXCEED = new ErrorCode(1_030_101_009, "采购订单项({})超过最大允许退货数量({})");
    ErrorCode PURCHASE_ORDER_PROCESS_FAIL_EXISTS_RETURN = new ErrorCode(1_030_101_010, "反审核失败，已存在对应的采购退货单");
    ErrorCode PURCHASE_ORDER_NOT_SUPPLIER = new ErrorCode(1_030_101_011, "采购订单还未选择供应商");


    // ========== ERP 采购入库（1-030-102-000） ==========
    ErrorCode PURCHASE_IN_NOT_EXISTS = new ErrorCode(1_030_102_000, "采购入库单不存在");
    ErrorCode PURCHASE_IN_DELETE_FAIL_APPROVE = new ErrorCode(1_030_102_001, "采购入库单({})已审核，无法删除");
    ErrorCode PURCHASE_IN_PROCESS_FAIL = new ErrorCode(1_030_102_002, "反审核失败，只有已审核的入库单才能反审核");
    ErrorCode PURCHASE_IN_APPROVE_FAIL = new ErrorCode(1_030_102_003, "审核失败，只有未审核的入库单才能审核");
    ErrorCode PURCHASE_IN_NO_EXISTS = new ErrorCode(1_030_102_004, "生成入库单失败，请重新提交");
    ErrorCode PURCHASE_IN_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_102_005, "采购入库单({})已审核，无法修改");
    ErrorCode PURCHASE_IN_NOT_APPROVE = new ErrorCode(1_030_102_006, "采购入库单未审核，无法操作");
    ErrorCode PURCHASE_IN_FAIL_PAYMENT_PRICE_EXCEED = new ErrorCode(1_030_102_007, "付款金额({})超过采购入库单总金额({})");
    ErrorCode PURCHASE_IN_PROCESS_FAIL_EXISTS_PAYMENT = new ErrorCode(1_030_102_008, "反审核失败，已存在对应的付款单");

    // ========== ERP 采购退货（1-030-103-000） ==========
    ErrorCode PURCHASE_RETURN_NOT_EXISTS = new ErrorCode(1_030_103_000, "采购退货单不存在");
    ErrorCode PURCHASE_RETURN_DELETE_FAIL_APPROVE = new ErrorCode(1_030_103_001, "采购退货单({})已审核，无法删除");
    ErrorCode PURCHASE_RETURN_PROCESS_FAIL = new ErrorCode(1_030_103_002, "反审核失败，只有已审核的退货单才能反审核");
    ErrorCode PURCHASE_RETURN_APPROVE_FAIL = new ErrorCode(1_030_103_003, "审核失败，只有未审核的退货单才能审核");
    ErrorCode PURCHASE_RETURN_NO_EXISTS = new ErrorCode(1_030_103_004, "生成退货单失败，请重新提交");
    ErrorCode PURCHASE_RETURN_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_103_005, "采购退货单({})已审核，无法修改");
    ErrorCode PURCHASE_RETURN_NOT_APPROVE = new ErrorCode(1_030_103_006, "采购退货单未审核，无法操作");
    ErrorCode PURCHASE_RETURN_FAIL_REFUND_PRICE_EXCEED = new ErrorCode(1_030_103_007, "退款金额({})超过采购退货单总金额({})");
    ErrorCode PURCHASE_RETURN_PROCESS_FAIL_EXISTS_REFUND = new ErrorCode(1_030_103_008, "反审核失败，已存在对应的退款单");

    // ========== ERP 客户（1-030-200-000）==========
    ErrorCode CUSTOMER_NOT_EXISTS = new ErrorCode(1_020_200_000, "客户不存在");
    ErrorCode CUSTOMER_NOT_ENABLE = new ErrorCode(1_020_200_001, "客户({})未启用");

    // ========== ERP 销售订单（1-030-201-000） ==========
    ErrorCode SALE_ORDER_NOT_EXISTS = new ErrorCode(1_020_201_000, "销售订单不存在");
    ErrorCode SALE_ORDER_DELETE_FAIL_APPROVE = new ErrorCode(1_020_201_001, "销售订单({})已审核，无法删除");
    ErrorCode SALE_ORDER_PROCESS_FAIL = new ErrorCode(1_020_201_002, "反审核失败，只有已审核的销售订单才能反审核");
    ErrorCode SALE_ORDER_APPROVE_FAIL = new ErrorCode(1_020_201_003, "审核失败，只有未审核的销售订单才能审核");
    ErrorCode SALE_ORDER_NO_EXISTS = new ErrorCode(1_020_201_004, "生成销售单号失败，请重新提交");
    ErrorCode SALE_ORDER_UPDATE_FAIL_APPROVE = new ErrorCode(1_020_201_005, "销售订单({})已审核，无法修改");
    ErrorCode SALE_ORDER_NOT_APPROVE = new ErrorCode(1_020_201_006, "销售订单未审核，无法操作");
    ErrorCode SALE_ORDER_ITEM_OUT_FAIL_MATERIAL_EXCEED = new ErrorCode(1_020_201_007, "销售订单项({})超过最大允许出库数量({})");
    ErrorCode SALE_ORDER_PROCESS_FAIL_EXISTS_OUT = new ErrorCode(1_020_201_008, "反审核失败，已存在对应的销售出库单");
    ErrorCode SALE_ORDER_ITEM_RETURN_FAIL_OUT_EXCEED = new ErrorCode(1_020_201_009, "销售订单项({})超过最大允许退货数量({})");
    ErrorCode SALE_ORDER_PROCESS_FAIL_EXISTS_RETURN = new ErrorCode(1_020_201_010, "反审核失败，已存在对应的销售退货单");

    // ========== ERP 销售出库（1-030-202-000） ==========
    ErrorCode SALE_OUT_NOT_EXISTS = new ErrorCode(1_020_202_000, "销售出库单不存在");
    ErrorCode SALE_OUT_DELETE_FAIL_APPROVE = new ErrorCode(1_020_202_001, "销售出库单({})已审核，无法删除");
    ErrorCode SALE_OUT_PROCESS_FAIL = new ErrorCode(1_020_202_002, "反审核失败，只有已审核的出库单才能反审核");
    ErrorCode SALE_OUT_APPROVE_FAIL = new ErrorCode(1_020_202_003, "审核失败，只有未审核的出库单才能审核");
    ErrorCode SALE_OUT_NO_EXISTS = new ErrorCode(1_020_202_004, "生成出库单失败，请重新提交");
    ErrorCode SALE_OUT_UPDATE_FAIL_APPROVE = new ErrorCode(1_020_202_005, "销售出库单({})已审核，无法修改");
    ErrorCode SALE_OUT_NOT_APPROVE = new ErrorCode(1_020_202_006, "销售出库单未审核，无法操作");
    ErrorCode SALE_OUT_FAIL_RECEIPT_PRICE_EXCEED = new ErrorCode(1_020_202_007, "收款金额({})超过销售出库单总金额({})");
    ErrorCode SALE_OUT_PROCESS_FAIL_EXISTS_RECEIPT = new ErrorCode(1_020_202_008, "反审核失败，已存在对应的收款单");

    // ========== ERP 销售退货（1-030-203-000） ==========
    ErrorCode SALE_RETURN_NOT_EXISTS = new ErrorCode(1_020_203_000, "销售退货单不存在");
    ErrorCode SALE_RETURN_DELETE_FAIL_APPROVE = new ErrorCode(1_020_203_001, "销售退货单({})已审核，无法删除");
    ErrorCode SALE_RETURN_PROCESS_FAIL = new ErrorCode(1_020_203_002, "反审核失败，只有已审核的退货单才能反审核");
    ErrorCode SALE_RETURN_APPROVE_FAIL = new ErrorCode(1_020_203_003, "审核失败，只有未审核的退货单才能审核");
    ErrorCode SALE_RETURN_NO_EXISTS = new ErrorCode(1_020_203_004, "生成退货单失败，请重新提交");
    ErrorCode SALE_RETURN_UPDATE_FAIL_APPROVE = new ErrorCode(1_020_203_005, "销售退货单({})已审核，无法修改");
    ErrorCode SALE_RETURN_NOT_APPROVE = new ErrorCode(1_020_203_006, "销售退货单未审核，无法操作");
    ErrorCode SALE_RETURN_FAIL_REFUND_PRICE_EXCEED = new ErrorCode(1_020_203_007, "退款金额({})超过销售退货单总金额({})");
    ErrorCode SALE_RETURN_PROCESS_FAIL_EXISTS_REFUND = new ErrorCode(1_020_203_008, "反审核失败，已存在对应的退款单");

    // ========== ERP 仓库 1-030-400-000 ==========
    ErrorCode WAREHOUSE_NOT_EXISTS = new ErrorCode(1_030_400_000, "仓库不存在");
    ErrorCode WAREHOUSE_NOT_ENABLE = new ErrorCode(1_030_400_001, "仓库({})未启用");

    // ========== ERP 其它入库单 1-030-401-000 ==========
    ErrorCode STOCK_IN_NOT_EXISTS = new ErrorCode(1_030_401_000, "其它入库单不存在");
    ErrorCode STOCK_IN_DELETE_FAIL_APPROVE = new ErrorCode(1_030_401_001, "其它入库单({})已审核，无法删除");
    ErrorCode STOCK_IN_PROCESS_FAIL = new ErrorCode(1_030_401_002, "反审核失败，只有已审核的入库单才能反审核");
    ErrorCode STOCK_IN_APPROVE_FAIL = new ErrorCode(1_030_401_003, "审核失败，只有未审核的入库单才能审核");
    ErrorCode STOCK_IN_NO_EXISTS = new ErrorCode(1_030_401_004, "生成入库单失败，请重新提交");
    ErrorCode STOCK_IN_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_401_005, "其它入库单({})已审核，无法修改");

    // ========== ERP 其它出库单 1-030-402-000 ==========
    ErrorCode STOCK_OUT_NOT_EXISTS = new ErrorCode(1_030_402_000, "其它出库单不存在");
    ErrorCode STOCK_OUT_DELETE_FAIL_APPROVE = new ErrorCode(1_030_402_001, "其它出库单({})已审核，无法删除");
    ErrorCode STOCK_OUT_PROCESS_FAIL = new ErrorCode(1_030_402_002, "反审核失败，只有已审核的出库单才能反审核");
    ErrorCode STOCK_OUT_APPROVE_FAIL = new ErrorCode(1_030_402_003, "审核失败，只有未审核的出库单才能审核");
    ErrorCode STOCK_OUT_NO_EXISTS = new ErrorCode(1_030_402_004, "生成出库单失败，请重新提交");
    ErrorCode STOCK_OUT_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_402_005, "其它出库单({})已审核，无法修改");
    ErrorCode STOCK_OUT_REQ_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_402_006, "领料出库单({})已审核，无法修改");
    ErrorCode STOCK_OUT_REQ_UPDATE_FAIL_NOT_EXISTS = new ErrorCode(1_030_402_007, "生产任务单物料清单({})不存在");
    ErrorCode STOCK_OUT_REQ_UPDATE_FAIL_EXCEED = new ErrorCode(1_030_402_008, "物料({})申领数量超过可领数量。");
    ErrorCode STOCK_OUT_RETURN_UPDATE_FAIL_LESS = new ErrorCode(1_030_402_009, "物料({})退料数量超过已领数量。");
    ErrorCode BACK_FLUSH_OUT_UPDATE_FAIL_EXCEED = new ErrorCode(1_030_402_008, "物料({})倒冲出库数量超过可领数量。");
    ErrorCode STOCK_OUT_REQ_BACK_FLUSH_NOT_SUPPORT = new ErrorCode(1_030_402_009, "物料({})为倒冲出库类型，不能进行手工领料。");

    // ========== ERP 库存调拨单 1-030-403-000 ==========
    ErrorCode STOCK_MOVE_NOT_EXISTS = new ErrorCode(1_030_402_000, "库存调拨单不存在");
    ErrorCode STOCK_MOVE_DELETE_FAIL_APPROVE = new ErrorCode(1_030_402_001, "库存调拨单({})已审核，无法删除");
    ErrorCode STOCK_MOVE_PROCESS_FAIL = new ErrorCode(1_030_402_002, "反审核失败，只有已审核的调拨单才能反审核");
    ErrorCode STOCK_MOVE_APPROVE_FAIL = new ErrorCode(1_030_402_003, "审核失败，只有未审核的调拨单才能审核");
    ErrorCode STOCK_MOVE_NO_EXISTS = new ErrorCode(1_030_402_004, "生成调拨号失败，请重新提交");
    ErrorCode STOCK_MOVE_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_402_005, "库存调拨单({})已审核，无法修改");

    // ========== ERP 库存盘点单 1-030-403-000 ==========
    ErrorCode STOCK_CHECK_NOT_EXISTS = new ErrorCode(1_030_403_000, "库存盘点单不存在");
    ErrorCode STOCK_CHECK_DELETE_FAIL_APPROVE = new ErrorCode(1_030_403_001, "库存盘点单({})已审核，无法删除");
    ErrorCode STOCK_CHECK_PROCESS_FAIL = new ErrorCode(1_030_403_002, "反审核失败，只有已审核的盘点单才能反审核");
    ErrorCode STOCK_CHECK_APPROVE_FAIL = new ErrorCode(1_030_403_003, "审核失败，只有未审核的盘点单才能审核");
    ErrorCode STOCK_CHECK_NO_EXISTS = new ErrorCode(1_030_403_004, "生成盘点号失败，请重新提交");
    ErrorCode STOCK_CHECK_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_403_005, "库存盘点单({})已审核，无法修改");

    // ========== ERP 产品库存 1-030-404-000 ==========
    ErrorCode STOCK_COUNT_NEGATIVE = new ErrorCode(1_030_404_000, "操作失败，产品({})所在仓库({})的库存：{}，小于变更数量：{}");
    ErrorCode STOCK_COUNT_NEGATIVE2 = new ErrorCode(1_030_404_001, "操作失败，产品({})所在仓库({})的库存不足");
    ErrorCode MATERIALINVENTORY_NOT_EXISTS = new ErrorCode(1_030_404_002, "物料库存属性不存在");
    // ========== ERP 产品 1-030-500-000 ==========
    ErrorCode MATERIAL_NOT_EXISTS = new ErrorCode(1_030_500_000, "物料不存在");
    ErrorCode MATERIAL_NOT_ENABLE = new ErrorCode(1_030_500_001, "物料({})未启用");
    ErrorCode MATERIALPLAN_NOT_EXISTS = new ErrorCode(1_030_500_002, "物料计划资料不存在");

    // ========== ERP 物料类别 1-030-501-000 ==========
    ErrorCode MATERIAL_CATEGORY_NOT_EXISTS = new ErrorCode(1_030_501_000, "物料类别不存在");
    ErrorCode MATERIAL_CATEGORY_EXITS_CHILDREN = new ErrorCode(1_030_501_001, "存在存在子物料类别，无法删除");
    ErrorCode MATERIAL_CATEGORY_PARENT_NOT_EXITS = new ErrorCode(1_030_501_002, "父级物料类别不存在");
    ErrorCode MATERIAL_CATEGORY_PARENT_ERROR = new ErrorCode(1_030_501_003, "不能设置自己为父物料类别");
    ErrorCode MATERIAL_CATEGORY_NAME_DUPLICATE = new ErrorCode(1_030_501_004, "已经存在该类别名称的物料类别");
    ErrorCode MATERIAL_CATEGORY_PARENT_IS_CHILD = new ErrorCode(1_030_501_005, "不能设置自己的子类别为父类别");
    ErrorCode MATERIAL_CATEGORY_EXITS_MATERIAL = new ErrorCode(1_030_502_002, "存在物料使用该类别，无法删除/修改");
    ErrorCode MATERIAL_CATEGORY_CODE_DUPLICATE = new ErrorCode(1_030_501_006, "已经存在该类别编码的物料类别");

    // ========== ERP 物料单位 1-030-502-000 ==========
    ErrorCode MATERIAL_UNIT_NOT_EXISTS = new ErrorCode(1_030_502_000, "物料单位不存在");
    ErrorCode MATERIAL_UNIT_NAME_DUPLICATE = new ErrorCode(1_030_502_001, "已存在该名字的物料单位");
    ErrorCode MATERIAL_UNIT_EXITS_MATERIAL = new ErrorCode(1_030_502_002, "存在物料使用该单位，无法删除");

    ErrorCode MATERIAL_NAME_EXISTS = new ErrorCode(1_030_502_003, "物料名称已经存在，不能重复");

    ErrorCode MATERIAL_BARCODE_EXISTS = new ErrorCode(1_030_502_004, "物料编码已经存在，不能重复");


    // ========== ERP 结算账户 1-030-600-000 ==========
    ErrorCode ACCOUNT_NOT_EXISTS = new ErrorCode(1_030_600_000, "结算账户不存在");
    ErrorCode ACCOUNT_NOT_ENABLE = new ErrorCode(1_030_600_001, "结算账户({})未启用");

    // ========== ERP 付款单 1-030-601-000 ==========
    ErrorCode FINANCE_PAYMENT_NOT_EXISTS = new ErrorCode(1_030_601_000, "付款单不存在");
    ErrorCode FINANCE_PAYMENT_DELETE_FAIL_APPROVE = new ErrorCode(1_030_601_001, "付款单({})已审核，无法删除");
    ErrorCode FINANCE_PAYMENT_PROCESS_FAIL = new ErrorCode(1_030_601_002, "反审核失败，只有已审核的付款单才能反审核");
    ErrorCode FINANCE_PAYMENT_APPROVE_FAIL = new ErrorCode(1_030_601_003, "审核失败，只有未审核的付款单才能审核");
    ErrorCode FINANCE_PAYMENT_NO_EXISTS = new ErrorCode(1_030_601_004, "生成付款单号失败，请重新提交");
    ErrorCode FINANCE_PAYMENT_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_601_005, "付款单({})已审核，无法修改");
    ErrorCode FINANCE_PAYMENT_GENERATE_ERROR = new ErrorCode(1_030_601_006, "付款单生成失败");

    // ========== ERP 收款单 1-030-602-000 ==========
    ErrorCode FINANCE_RECEIPT_NOT_EXISTS = new ErrorCode(1_030_602_000, "收款单不存在");
    ErrorCode FINANCE_RECEIPT_DELETE_FAIL_APPROVE = new ErrorCode(1_030_602_001, "收款单({})已审核，无法删除");
    ErrorCode FINANCE_RECEIPT_PROCESS_FAIL = new ErrorCode(1_030_602_002, "反审核失败，只有已审核的收款单才能反审核");
    ErrorCode FINANCE_RECEIPT_APPROVE_FAIL = new ErrorCode(1_030_602_003, "审核失败，只有未审核的收款单才能审核");
    ErrorCode FINANCE_RECEIPT_NO_EXISTS = new ErrorCode(1_030_602_004, "生成收款单号失败，请重新提交");
    ErrorCode FINANCE_RECEIPT_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_602_005, "收款单({})已审核，无法修改");
    ErrorCode FINANCE_RECEIPT_GENERATE_ERROR = new ErrorCode(1_030_602_006, "收款单生成失败");


    // ========== ERP 对账单 1-030-603-000 ==========
    ErrorCode FINANCE_STATEMENT_NOT_EXISTS = new ErrorCode(1_030_603_000, "对账单不存在");
    ErrorCode FINANCE_STATEMENT_NO_EXISTS = new ErrorCode(1_030_603_001, "对账单号已存在");
    ErrorCode FINANCE_STATEMENT_PROCESS_FAIL = new ErrorCode(1-030-603-002, "反审核失败，只有已审核的对账单才能反审核");
    ErrorCode FINANCE_STATEMENT_APPROVE_FAIL = new ErrorCode(1-030-603-003, "审核失败，只有未审核的对账单才能审核");
    ErrorCode FINANCE_STATEMENT_RECONCILIATION_CYCLE_FORMAT_ERROR = new ErrorCode(1-030-603-004, "对账周期格式错误");
    ErrorCode FINANCE_STATEMENT_BATCH_SAVE_ERROR = new ErrorCode(1-030-603-005, "批量保存对账单异常");
    ErrorCode FINANCE_STATEMENT_ITEMS_BATCH_SAVE_ERROR = new ErrorCode(1-030-603-006, "批量保存对账单明细异常");
    ErrorCode FINANCE_STATEMENT_ITEM_NOT_EXISTS = new ErrorCode(1-030-603-007, "对账单明细不存在");
    ErrorCode CHANGE_FINANCE_STATEMENT_TRANSACTION_AMOUNT_ERROR = new ErrorCode(1-030-603_008, "变更对账单交易金额异常");
    ErrorCode  FINANCE_STATEMENT_PROCESS_FAIL_EXISTS_PAYMENT = new ErrorCode(1-030-603_009, "反审核失败，该单据存在对应的付款单");
    ErrorCode  FINANCE_STATEMENT_PROCESS_FAIL_EXISTS_RECEIPT = new ErrorCode(1-030-603_010, "反审核失败，该单据存在对应的收款单");




    // =========== ERP 生产制造 数据 1-030-700
    ErrorCode BOM_NOT_EXISTS = new ErrorCode(1_030_700_001, "bom不存在");
    ErrorCode BOM_ITEMS_NOT_EXISTS = new ErrorCode(1_030_700_002, "bom分录不存在");
    ErrorCode BOM_EXISTS = new ErrorCode(1_030_700_003, "bom已存在");
    ErrorCode PRODUCE_PROCESS_NOT_EXISTS = new ErrorCode(1_030_700_004, "工艺工序不存在");
    ErrorCode PRODUCE_ROUTING_NOT_EXISTS = new ErrorCode(1_030_700_005, "工艺路线不存在");
    ErrorCode MAIN_PLAN_NOT_EXISTS = new ErrorCode(1_030_700_006, "主计划不存在");
    ErrorCode BOM_NO_EXISTS = new ErrorCode(1_030_700_007, "生成BOM单号失败，请重新提交");
    ErrorCode BOM_MATERIAL_EXISTS = new ErrorCode(1_030_700_008, "物料已存在BOM，不能重复添加");
    ErrorCode MAIN_PLAN_NO_EXISTS = new ErrorCode(1_030_700_009, "生成主计划单号失败，请重新提交");
    ErrorCode PRODUCTION_TASK_NOT_EXISTS = new ErrorCode(1_030_700_010, "生产任务不存在");
    ErrorCode PRODUCTION_TASK_NO_EXISTS = new ErrorCode(1_030_700_011, "生产任务编码已存在");
    ErrorCode MATERIAL_REQUIREMENT_PLAN_NOT_EXISTS = new ErrorCode(1_030_700_012, "物料需求计划不存在");

    ErrorCode BOM_SLEFMADE_NOT_EXISTS = new ErrorCode(1_030_700_001, "BOM物料中有自制件，自制件必须先要有对应BOM才可以选择。");

    ErrorCode PRODUCTION_PROCESS_NOT_EXISTS = new ErrorCode(1_030_700_010, "生产任务对应的工序不存在");

    // ========== bom分组 1-030-701 ==========
    ErrorCode BOM_GROUP_STANDARD_NOT_EXISTS = new ErrorCode(1_030_701_000, "bom分组不存在");
    ErrorCode BOM_GROUP_STANDARD_EXITS_CHILDREN = new ErrorCode(1_030_701_001, "存在子bom分组，无法删除");
    ErrorCode BOM_GROUP_STANDARD_PARENT_NOT_EXITS = new ErrorCode(1_030_701_002, "父级bom分组不存在");
    ErrorCode BOM_GROUP_STANDARD_PARENT_ERROR = new ErrorCode(1_030_701_003, "不能设置自己为父bom分组");
    ErrorCode BOM_GROUP_STANDARD_NAME_DUPLICATE = new ErrorCode(1_030_701_004, "已经存在该名称的bom分组");
    ErrorCode BOM_GROUP_STANDARD_PARENT_IS_CHILD = new ErrorCode(1_030_701_005, "不能设置自己的子BomGroupStandard为父BomGroupStandard");

    // ========== ERP工厂日历 1-030-702 ==========
    ErrorCode FACTORY_CALENDAR_NOT_EXISTS = new ErrorCode(1_030_702_001, "ERP工厂日历不存在");

    // ========== ERP物料库存 1-030-703 ==========
    ErrorCode MATERIAL_INVENTORY_NOT_EXISTS = new ErrorCode(1_030_703_001, "物料库存不存在");

    // ========== ERP物料计划 1-030-704 ==========
    ErrorCode MATERIAL_PLAN_NOT_EXISTS = new ErrorCode(1_030_704_001, "物料计划不存在");

    // ========== ERP物料采购 1-030-705 ==========
    ErrorCode MATERIAL_PURCHASING_NOT_EXISTS = new ErrorCode(1_030_705_001, "物料采购信息不存在");

    // ====================== ERP 采购申请 数据 1-030-706 ======================
    ErrorCode PURCHASE_REQUEST_NOT_EXISTS = new ErrorCode(1-030-706_001, "采购申请单不存在");
    ErrorCode PURCHASE_REQUEST_NO_EXISTS = new ErrorCode(1_030_706_009, "生成采购申请单号失败，请重新提交");

    ErrorCode PURCHASE_REQUEST_PROCESS_FAIL = new ErrorCode(1_030_706_002, "反审核失败，只有已审核的采购申请单才能反审核");
    ErrorCode PURCHASE_REQUEST_APPROVE_FAIL = new ErrorCode(1_030_706_003, "审核失败，只有未审核的采购申请单才能审核");

    ErrorCode PURCHASE_REQUEST_UPDATE_FAIL_APPROVE = new ErrorCode(1_030_706_005, "采购申请单({})已审核，无法修改");
    ErrorCode PURCHASE_REQUEST_NOT_APPROVE = new ErrorCode(1_030_706_006, "采购申请单未审核，无法操作");
    ErrorCode PURCHASE_REQUEST_PROCESS_FAIL_EXISTS_ORDER = new ErrorCode(1_030_706_008, "反审核失败，已存在对应的采购订单");
    ErrorCode PURCHASE_REQUEST_PUSH_FAIL = new ErrorCode(1_030_706_009, "采购数量超出了采购申请单的数量，请修改数量。");
    ErrorCode PURCHASE_REQUEST_DELETE_FAIL_EXISTS_ORDER = new ErrorCode(1_030_706_010, "采购申请单已存在对应的采购订单，无法直接删除，请先删除对应的采购订单。");

    // ====================== ERP 用户自定义设置 数据 1-030-707 ======================
    ErrorCode USER_CUSTOMIZE_CONFIG_NOT_EXISTS = new ErrorCode(1_030_707_001, "用户自定义设置不存在");
    ErrorCode OPEN_AUTO_CREATE_PURCHASE_ORDER_FAIL = new ErrorCode(1_030_707_002, "开启自动创建采购订单功能失败，请先开启[自动审批采购申请单功能]");

    ErrorCode USER_PROCESS_MAPPING_NOT_EXISTS = new ErrorCode(1_030_707_003, "人员工序对照不存在");

    // ========== ERP生产入库 1-030-708 ==========
    ErrorCode PRODUCE_IN_NOT_EXISTS = new ErrorCode(1-030-708_001, "生产入库单不存在");
    ErrorCode PRODUCE_IN_NO_EXISTS = new ErrorCode(1-030-708_001, "生产入库单号已存在");
    ErrorCode PRODUCE_IN_PROCESS_FAIL = new ErrorCode(1_030_708_002, "反审核失败，只有已审核的生产入库请单才能反审核");
    ErrorCode PRODUCE_IN_APPROVE_FAIL = new ErrorCode(1_030_708_003, "审核失败，只有未审核的生产入库单才能审核");

    ErrorCode PRODUCTION_TASK_IN_FAIL_PRODUCT_EXCEED = new ErrorCode(1_030_708_004, "生产任务单({})超过最大允许入库数量({})");
    ErrorCode PRODUCE_IN_DELETE_FAIL_APPROVE = new ErrorCode(1_030_708_005, "生产入库单已审核，无法删除");

    ErrorCode PRODUCE_IN_STOCK_NO_EXISTS = new ErrorCode(1_030_708_006, "仓库必须指定，不能为空");
    ErrorCode PRODUCE_IN_EVENT_NOT_EXISTS = new ErrorCode(1_030_708_007, "生产入库事务不存在");



    // ========== MRP运算 1-030-709 ==========
    ErrorCode MRP_CALCULATION_TYPE_ERROR = new ErrorCode(1-030-709_001, "MRP运算类型错误");
    ErrorCode MRP_CALCULATION_PARAM_NON_NULL = new ErrorCode(1-030-709_002, "MRP运算失败，参数不正确");
    ErrorCode MRP_CALCULATION_MATERIAL_INFO_ERROR = new ErrorCode(1-030-709_003, "MRP运算失败，物料信息有误，请确认");
    ErrorCode MRP_CALCULATION_MATERIAL_BOM_NOT_EXISTS = new ErrorCode(1-030-709_004, "MRP运算失败，物料BOM信息不完整，请确认");
    ErrorCode MRP_NO_EXISTS = new ErrorCode(1-030-709_005, "MRP编码已存在，请重试!");
    ErrorCode MRP_CALCULATION_MAIN_PLAN_ERROR= new ErrorCode(1-030-709_006, "MRP运算失败，主计划信息错误");
    ErrorCode MRP_ANTI_APPROVAL_FAIL_EXISTS_RELEASED= new ErrorCode(1-030-709_007, "反审批失败，存在已经下达的任务");
    ErrorCode MRP_RELEASED_FAIL_INFO_ERROR= new ErrorCode(1-030-709_008, "MRP下达任务失败，MRP信息有误");
    ErrorCode MRP_RELEASED_FAIL_PARAM_ERROR= new ErrorCode(1-030-709_009, "MRP下达任务失败，请求参数不正确");
    ErrorCode MRP_RELEASED_FAIL_TASK_ERROR= new ErrorCode(1-030-709_010, "MRP下达任务失败，服务器异常");



}
